Skip to content

Conversation

@rajatchopra
Copy link

Meant for those targets (e.g. cluster) that have an action associated with them. 'Cluster' as a WritableAsset does not cover its intent.

This PR is a proposed fix for the issue raised by @wking in this comment.

With the state file supplying asset values instead of them being generated, the cluster 'Asset' is not sufficient to describe that it is a special kind of target.
In this commit, the 'Cluster' WritableAsset is now a TargetableAsset, which has a special meaning - they will have an 'Apply' function that will be executed irrespective of whether 'Generate' is called upon the asset or not.

…ssociated with them

With the state file supplying asset values instead of them being generated, the cluster 'Asset' is not sufficient to describe that it is a special kind of target.
In this commit, the 'Cluster' WritableAsset is now a TargetableAsset, which has a special meaning - they will have an 'Apply' function that will be executed irrespective of whether 'Generate' is called upon the asset or not.
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rajatchopra

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 16, 2018
@crawford
Copy link
Contributor

/close

There is no distinction between an asset which is targeted and one that is not.

@openshift-ci-robot
Copy link
Contributor

@crawford: Closing this PR.

Details

In response to this:

/close

There is no distinction between an asset which is targeted and one that is not.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rajatchopra
Copy link
Author

There is no distinction between an asset which is targeted and one that is not.

I perhaps mean to suggest that some assets/targets have actions associated over and above stuff that is written/persisted to disk e.g. 'cluster' actually creates the cluster and not just dump manifest/tfvars. Did you just not like the name 'TargetableAsset' here?

@crawford
Copy link
Contributor

We already have a generate method. This contains all of the functionality needed to create that particular asset. There shouldn't be a separate process for some assets.

@abhinavdahiya
Copy link
Contributor

e.g. 'cluster' actually creates the cluster and not just dump manifest/tfvars

That not exactly correct, the cluster asset is not just dumping tfvars, tfstate. metadata.json etc... it is creating the cluster to generate them.

@rajatchopra rajatchopra deleted the targetable_asset branch October 22, 2018 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants